//
//  BaseController.h
//  deerkids
//
//  Created by 王昭的Mac Air on 2017/8/28.
//  Copyright © 2017年 wangzhao. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "AppDelegate.h"
/*!
 @enum
 @abstract  页面公用点击
 @constant  BACK_BUTTON，顶部左上角按钮tag
 @constant  RIGHT_BUTTON，顶部右上角按钮tag
 @constant  ...
 */
typedef NS_ENUM(NSInteger, MenuButtonTag) {
    BACK_BUTTON=1,
    RIGHT_BUTTON=2,
    OTHER_BUTTON=3,
    DOWN_BTNTAG1=4,
    DOWN_BTNTAG2=5,
    DOWN_BTNTAG3=6,
};


@interface BaseController : UIViewController

@property(nonatomic,retain)UIView *titleMenu;

@property(nonatomic,retain)UIButton *menuTitleButton;
@property(nonatomic,retain)UIButton *menuLeftButton;
@property(nonatomic,retain)UIButton *menuRightButton;
@property(nonatomic,retain)UIButton *otherButton;

@property(nonatomic,strong) UIView *placeholderView;

- (void)setNavigationBar;


-(void)backAction;

/**
 * 创建顶部导航
 * menuTitleButton; 中间标题
 * menuLeftButton;  左边返回
 * menuRightButton; 右边按钮
 * otherButton;     右边按钮
 *
 */
-(void)createTitleMenu;

/**
 * button 点击
 * MenuButtonTag tag 枚举值
 */
-(IBAction)buttonClick:(UIButton *)sender;


-(void)openPushVC:(UIViewController *) vc;



-(UIView *)createTips:(NSString *)tip y:(CGFloat) y;

- (void)createPlaceholderView:(NSString *)title message:(NSString *)message image:(UIImage *)image withView:(UIView *)superView action:(void (^)(UIButton *button)) clickblock;

- (void)removePlaceholderView;



-(UIView *)createTableFooter;
-(UIImageView *)createImageView;
-(UILabel *) createLabel;
-(UIButton *) createButton;
@end
